﻿using System;
using System.Web;
using Rabbit.Logic;
using RabbitManage.Code;

namespace RabbitManage.Action
{
    public partial class ProductDelete : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //HttpCookie cookie = Request.Cookies[Constant.CookieName];
            //if (cookie == null || string.IsNullOrEmpty(cookie.Values[Constant.CookieUid]))
            //{
            //    Response.Redirect(Constant.LogonPage, false);
            //    return;
            //}

            string id = Request["id"];
            if (string.IsNullOrEmpty(id)) return;
            RabbitUse.DeleteProductById(Db.Store, id);
            Response.Redirect("../UI/ProductList.aspx", false);
        }
    }
}